package com.design.yjx.iterator.component;

public class MenuItem extends MenuComponent {
	String name;
	String description;
	boolean vegetarian;
	double price;
 
	public MenuItem(String name,
                    String description,
                    boolean vegetarian,
                    double price)
	{
		this.name = name;
		this.description = description;
		this.vegetarian = vegetarian;
		this.price = price;
	}
  
	public String getName() {
		return name;
	}
  
	public String getDescription() {
		return description;
	}
  
	public double getPrice() {
		return price;
	}
  
	public boolean isVegetarian() {
		return vegetarian;
	}

	@Override
	public void print() {
		String s =  "MenuItem{" +
				"name='" + name + '\'' +
				", description='" + description + '\'' +
				", vegetarian=" + vegetarian +
				", price=" + price +
				'}';

		System.out.println(s);
	}
}
